// Problem: Color the ball
// Contest: HDOJ
// URL: https://acm.hdu.edu.cn/showproblem.php?pid=1556
// Memory Limit: 32 MB
// Time Limit: 9000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

#include<iostream>
#include<string.h>

using namespace std;
#define lowbit(x) (x&(-x))
const int N=100010;
int n;
int tree[N]={0};

void update(int x,int d)
{
	while(x<=N)
	{
		tree[x]+=d;
		x+=lowbit(x);
	}
}

int sum(int x)
{
	int ans=0;
	while(x>0)
	{
		ans+=tree[x];
		x-=lowbit(x);
	}
	return ans;
}

int main()
{
	while(~scanf("%d",&n))
	{
		memset(tree,0,sizeof tree);
		for(int i=1;i<=n;++i)
		{
			int l,r;
			cin>>l>>r;
			update(l,1);
			update(r+1,-1);
		}
		for(int i=1;i<=n;++i)
		{
			if(i!=n) printf("%d ",sum(i));
			else printf("%d\n",sum(i));
		}
	}
	return 0;
}